package com.apache.ius.controller;

import com.apache.rpc.common.RpcUtil;
import com.apache.tools.MD5Utils;
import com.apache.tools.StrUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * description:
 * @author xhe 创建时间：2019年03月11日
 */
@Controller
public class WelcomeAction extends BaseAction {

    /**
     * 跳到管理后台首页面
     */
    @RequestMapping(value = "/", method = RequestMethod.GET)
    public ModelAndView index(HttpServletRequest request) throws ServletException, IOException {
        ModelAndView model = new ModelAndView();
        Map<String, Object> defMap = super.getDefaultDataMap(request);//获取freemark模板所需变量
        model.addAllObjects(defMap);
        model.setViewName("/WEB-INF/pages/plateform/admin/index-home-sys");//指定跳转页面地址，根目录=配置文件spring.mvc.view.prefix值
        return model;
    }

}
